home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / SpeedLimit.h < prev    next >
C/C++ Source or Header  |  2011-11-06  |  2KB  |  72 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // SpeedLimit.h: interface for the CSpeedLimit class.
  20. //
  21. //////////////////////////////////////////////////////////////////////
  22.  
  23. #if !defined(AFX_SPEEDLIMIT_H__D4CEBB35_CE08_4438_9A42_4F565DE84AE4__INCLUDED_)
  24. #define AFX_SPEEDLIMIT_H__D4CEBB35_CE08_4438_9A42_4F565DE84AE4__INCLUDED_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif // _MSC_VER > 1000
  29.  
  30. class TiXmlElement;
  31. class CSpeedLimit
  32. {
  33. public:
  34.     bool IsItActive(const SYSTEMTIME &time) const;
  35.     CSpeedLimit();
  36.     virtual ~CSpeedLimit();
  37.  
  38.     virtual int GetRequiredBufferLen() const;
  39.     virtual char * FillBuffer(char *p) const;
  40.     virtual unsigned char * ParseBuffer(unsigned char *pBuffer, int length);
  41.  
  42.     BOOL m_DateCheck;
  43.     struct t_date
  44.     {
  45.         int y;
  46.         int m;
  47.         int d;
  48.     } m_Date;
  49.  
  50.     BOOL m_FromCheck;
  51.     BOOL m_ToCheck;
  52.  
  53.     struct t_time
  54.     {
  55.         int h;
  56.         int m;
  57.         int s;
  58.     } m_FromTime, m_ToTime;
  59.     int    m_Speed;
  60.     int m_Day;
  61.  
  62.     void Save(TiXmlElement* pElement);
  63.     bool Load(TiXmlElement* pElement);
  64.  
  65. protected:
  66.     t_time ReadTime(TiXmlElement* pElement);
  67. };
  68.  
  69. typedef std::vector<CSpeedLimit> SPEEDLIMITSLIST;
  70.  
  71. #endif // !defined(AFX_SPEEDLIMIT_H__D4CEBB35_CE08_4438_9A42_4F565DE84AE4__INCLUDED_)
  72.